3.361 \(\int \frac{1}{\sqrt{d \tan (e+f x)} (a+a \tan (e+f x))} \, dx\)

Optimal. Leaf size=81 \[ \frac{\tan ^{-1}\left (\frac{\sqrt{d \tan (e+f x)}}{\sqrt{d}}\right )}{a \sqrt{d} f}+\frac{\tanh ^{-1}\left (\frac{\sqrt{d} (\tan (e+f x)+1)}{\sqrt{2} \sqrt{d \tan (e+f x)}}\right )}{\sqrt{2} a \sqrt{d} f} \]

[Out]

ArcTan[Sqrt[d*Tan[e + f*x]]/Sqrt[d]]/(a*Sqrt[d]*f) + ArcTanh[(Sqrt[d]*(1 + Tan[e + f*x]))/(Sqrt[2]*Sqrt[d*Tan[
e + f*x]])]/(Sqrt[2]*a*Sqrt[d]*f)

________________________________________________________________________________________

Rubi [A]  time = 0.200001, antiderivative size = 81, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.24, Rules used = {3574, 3532, 208, 3634, 63, 205} \[ \frac{\tan ^{-1}\left (\frac{\sqrt{d \tan (e+f x)}}{\sqrt{d}}\right )}{a \sqrt{d} f}+\frac{\tanh ^{-1}\left (\frac{\sqrt{d} (\tan (e+f x)+1)}{\sqrt{2} \sqrt{d \tan (e+f x)}}\right )}{\sqrt{2} a \sqrt{d} f} \]

Antiderivative was successfully verified.

[In]

Int[1/(Sqrt[d*Tan[e + f*x]]*(a + a*Tan[e + f*x])),x]

[Out]

ArcTan[Sqrt[d*Tan[e + f*x]]/Sqrt[d]]/(a*Sqrt[d]*f) + ArcTanh[(Sqrt[d]*(1 + Tan[e + f*x]))/(Sqrt[2]*Sqrt[d*Tan[
e + f*x]])]/(Sqrt[2]*a*Sqrt[d]*f)

Rule 3574

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)/((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[1/
(c^2 + d^2), Int[(a + b*Tan[e + f*x])^m*(c - d*Tan[e + f*x]), x], x] + Dist[d^2/(c^2 + d^2), Int[((a + b*Tan[e
 + f*x])^m*(1 + Tan[e + f*x]^2))/(c + d*Tan[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c -
a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] &&  !IntegerQ[m]

Rule 3532

Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/Sqrt[(b_.)*tan[(e_.) + (f_.)*(x_)]], x_Symbol] :> Dist[(-2*d^2)/f,
Subst[Int[1/(2*c*d + b*x^2), x], x, (c - d*Tan[e + f*x])/Sqrt[b*Tan[e + f*x]]], x] /; FreeQ[{b, c, d, e, f}, x
] && EqQ[c^2 - d^2, 0]

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rule 3634

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_.)*((A_) + (C_.)*
tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Dist[A/f, Subst[Int[(a + b*x)^m*(c + d*x)^n, x], x, Tan[e + f*x]], x]
 /; FreeQ[{a, b, c, d, e, f, A, C, m, n}, x] && EqQ[A, C]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{1}{\sqrt{d \tan (e+f x)} (a+a \tan (e+f x))} \, dx &=\frac{1}{2} \int \frac{1+\tan ^2(e+f x)}{\sqrt{d \tan (e+f x)} (a+a \tan (e+f x))} \, dx+\frac{\int \frac{a-a \tan (e+f x)}{\sqrt{d \tan (e+f x)}} \, dx}{2 a^2}\\ &=\frac{\operatorname{Subst}\left (\int \frac{1}{\sqrt{d x} (a+a x)} \, dx,x,\tan (e+f x)\right )}{2 f}-\frac{\operatorname{Subst}\left (\int \frac{1}{-2 a^2+d x^2} \, dx,x,\frac{a+a \tan (e+f x)}{\sqrt{d \tan (e+f x)}}\right )}{f}\\ &=\frac{\tanh ^{-1}\left (\frac{\sqrt{d} (1+\tan (e+f x))}{\sqrt{2} \sqrt{d \tan (e+f x)}}\right )}{\sqrt{2} a \sqrt{d} f}+\frac{\operatorname{Subst}\left (\int \frac{1}{a+\frac{a x^2}{d}} \, dx,x,\sqrt{d \tan (e+f x)}\right )}{d f}\\ &=\frac{\tan ^{-1}\left (\frac{\sqrt{d \tan (e+f x)}}{\sqrt{d}}\right )}{a \sqrt{d} f}+\frac{\tanh ^{-1}\left (\frac{\sqrt{d} (1+\tan (e+f x))}{\sqrt{2} \sqrt{d \tan (e+f x)}}\right )}{\sqrt{2} a \sqrt{d} f}\\ \end{align*}

Mathematica [A]  time = 0.474589, size = 107, normalized size = 1.32 \[ \frac{\sqrt{\tan (e+f x)} \left (4 \tan ^{-1}\left (\sqrt{\tan (e+f x)}\right )+\sqrt{2} \left (\log \left (\tan (e+f x)+\sqrt{2} \sqrt{\tan (e+f x)}+1\right )-\log \left (-\tan (e+f x)+\sqrt{2} \sqrt{\tan (e+f x)}-1\right )\right )\right )}{4 a f \sqrt{d \tan (e+f x)}} \]

Antiderivative was successfully verified.

[In]

Integrate[1/(Sqrt[d*Tan[e + f*x]]*(a + a*Tan[e + f*x])),x]

[Out]

((4*ArcTan[Sqrt[Tan[e + f*x]]] + Sqrt[2]*(-Log[-1 + Sqrt[2]*Sqrt[Tan[e + f*x]] - Tan[e + f*x]] + Log[1 + Sqrt[
2]*Sqrt[Tan[e + f*x]] + Tan[e + f*x]]))*Sqrt[Tan[e + f*x]])/(4*a*f*Sqrt[d*Tan[e + f*x]])

________________________________________________________________________________________

Maple [B]  time = 0.043, size = 364, normalized size = 4.5 \begin{align*}{\frac{\sqrt{2}}{8\,fad}\sqrt [4]{{d}^{2}}\ln \left ({ \left ( d\tan \left ( fx+e \right ) +\sqrt [4]{{d}^{2}}\sqrt{d\tan \left ( fx+e \right ) }\sqrt{2}+\sqrt{{d}^{2}} \right ) \left ( d\tan \left ( fx+e \right ) -\sqrt [4]{{d}^{2}}\sqrt{d\tan \left ( fx+e \right ) }\sqrt{2}+\sqrt{{d}^{2}} \right ) ^{-1}} \right ) }+{\frac{\sqrt{2}}{4\,fad}\sqrt [4]{{d}^{2}}\arctan \left ({\sqrt{2}\sqrt{d\tan \left ( fx+e \right ) }{\frac{1}{\sqrt [4]{{d}^{2}}}}}+1 \right ) }-{\frac{\sqrt{2}}{4\,fad}\sqrt [4]{{d}^{2}}\arctan \left ( -{\sqrt{2}\sqrt{d\tan \left ( fx+e \right ) }{\frac{1}{\sqrt [4]{{d}^{2}}}}}+1 \right ) }-{\frac{\sqrt{2}}{8\,fa}\ln \left ({ \left ( d\tan \left ( fx+e \right ) -\sqrt [4]{{d}^{2}}\sqrt{d\tan \left ( fx+e \right ) }\sqrt{2}+\sqrt{{d}^{2}} \right ) \left ( d\tan \left ( fx+e \right ) +\sqrt [4]{{d}^{2}}\sqrt{d\tan \left ( fx+e \right ) }\sqrt{2}+\sqrt{{d}^{2}} \right ) ^{-1}} \right ){\frac{1}{\sqrt [4]{{d}^{2}}}}}-{\frac{\sqrt{2}}{4\,fa}\arctan \left ({\sqrt{2}\sqrt{d\tan \left ( fx+e \right ) }{\frac{1}{\sqrt [4]{{d}^{2}}}}}+1 \right ){\frac{1}{\sqrt [4]{{d}^{2}}}}}+{\frac{\sqrt{2}}{4\,fa}\arctan \left ( -{\sqrt{2}\sqrt{d\tan \left ( fx+e \right ) }{\frac{1}{\sqrt [4]{{d}^{2}}}}}+1 \right ){\frac{1}{\sqrt [4]{{d}^{2}}}}}+{\frac{1}{fa}\arctan \left ({\sqrt{d\tan \left ( fx+e \right ) }{\frac{1}{\sqrt{d}}}} \right ){\frac{1}{\sqrt{d}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(d*tan(f*x+e))^(1/2)/(a+a*tan(f*x+e)),x)

[Out]

1/8/f/a/d*(d^2)^(1/4)*2^(1/2)*ln((d*tan(f*x+e)+(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)*2^(1/2)+(d^2)^(1/2))/(d*tan(f*
x+e)-(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)*2^(1/2)+(d^2)^(1/2)))+1/4/f/a/d*(d^2)^(1/4)*2^(1/2)*arctan(2^(1/2)/(d^2)
^(1/4)*(d*tan(f*x+e))^(1/2)+1)-1/4/f/a/d*(d^2)^(1/4)*2^(1/2)*arctan(-2^(1/2)/(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)+
1)-1/8/f/a/(d^2)^(1/4)*2^(1/2)*ln((d*tan(f*x+e)-(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)*2^(1/2)+(d^2)^(1/2))/(d*tan(f
*x+e)+(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)*2^(1/2)+(d^2)^(1/2)))-1/4/f/a/(d^2)^(1/4)*2^(1/2)*arctan(2^(1/2)/(d^2)^
(1/4)*(d*tan(f*x+e))^(1/2)+1)+1/4/f/a/(d^2)^(1/4)*2^(1/2)*arctan(-2^(1/2)/(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)+1)+
arctan((d*tan(f*x+e))^(1/2)/d^(1/2))/a/f/d^(1/2)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(d*tan(f*x+e))^(1/2)/(a+a*tan(f*x+e)),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.9902, size = 568, normalized size = 7.01 \begin{align*} \left [-\frac{\sqrt{2} \sqrt{-d} \arctan \left (\frac{\sqrt{2} \sqrt{d \tan \left (f x + e\right )} \sqrt{-d}{\left (\tan \left (f x + e\right ) + 1\right )}}{2 \, d \tan \left (f x + e\right )}\right ) + \sqrt{-d} \log \left (\frac{d \tan \left (f x + e\right ) - 2 \, \sqrt{d \tan \left (f x + e\right )} \sqrt{-d} - d}{\tan \left (f x + e\right ) + 1}\right )}{2 \, a d f}, \frac{\sqrt{2} \sqrt{d} \log \left (\frac{d \tan \left (f x + e\right )^{2} + 2 \, \sqrt{2} \sqrt{d \tan \left (f x + e\right )} \sqrt{d}{\left (\tan \left (f x + e\right ) + 1\right )} + 4 \, d \tan \left (f x + e\right ) + d}{\tan \left (f x + e\right )^{2} + 1}\right ) + 4 \, \sqrt{d} \arctan \left (\frac{\sqrt{d \tan \left (f x + e\right )}}{\sqrt{d}}\right )}{4 \, a d f}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(d*tan(f*x+e))^(1/2)/(a+a*tan(f*x+e)),x, algorithm="fricas")

[Out]

[-1/2*(sqrt(2)*sqrt(-d)*arctan(1/2*sqrt(2)*sqrt(d*tan(f*x + e))*sqrt(-d)*(tan(f*x + e) + 1)/(d*tan(f*x + e)))
+ sqrt(-d)*log((d*tan(f*x + e) - 2*sqrt(d*tan(f*x + e))*sqrt(-d) - d)/(tan(f*x + e) + 1)))/(a*d*f), 1/4*(sqrt(
2)*sqrt(d)*log((d*tan(f*x + e)^2 + 2*sqrt(2)*sqrt(d*tan(f*x + e))*sqrt(d)*(tan(f*x + e) + 1) + 4*d*tan(f*x + e
) + d)/(tan(f*x + e)^2 + 1)) + 4*sqrt(d)*arctan(sqrt(d*tan(f*x + e))/sqrt(d)))/(a*d*f)]

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{1}{\sqrt{d \tan{\left (e + f x \right )}} \tan{\left (e + f x \right )} + \sqrt{d \tan{\left (e + f x \right )}}}\, dx}{a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(d*tan(f*x+e))**(1/2)/(a+a*tan(f*x+e)),x)

[Out]

Integral(1/(sqrt(d*tan(e + f*x))*tan(e + f*x) + sqrt(d*tan(e + f*x))), x)/a

________________________________________________________________________________________

Giac [B]  time = 1.57962, size = 358, normalized size = 4.42 \begin{align*} \frac{1}{8} \, d^{2}{\left (\frac{2 \, \sqrt{2}{\left (d \sqrt{{\left | d \right |}} -{\left | d \right |}^{\frac{3}{2}}\right )} \arctan \left (\frac{\sqrt{2}{\left (\sqrt{2} \sqrt{{\left | d \right |}} + 2 \, \sqrt{d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt{{\left | d \right |}}}\right )}{a d^{4} f} + \frac{2 \, \sqrt{2}{\left (d \sqrt{{\left | d \right |}} -{\left | d \right |}^{\frac{3}{2}}\right )} \arctan \left (-\frac{\sqrt{2}{\left (\sqrt{2} \sqrt{{\left | d \right |}} - 2 \, \sqrt{d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt{{\left | d \right |}}}\right )}{a d^{4} f} + \frac{8 \, \arctan \left (\frac{\sqrt{d \tan \left (f x + e\right )}}{\sqrt{d}}\right )}{a d^{\frac{5}{2}} f} + \frac{\sqrt{2}{\left (d \sqrt{{\left | d \right |}} +{\left | d \right |}^{\frac{3}{2}}\right )} \log \left (d \tan \left (f x + e\right ) + \sqrt{2} \sqrt{d \tan \left (f x + e\right )} \sqrt{{\left | d \right |}} +{\left | d \right |}\right )}{a d^{4} f} - \frac{\sqrt{2}{\left (d \sqrt{{\left | d \right |}} +{\left | d \right |}^{\frac{3}{2}}\right )} \log \left (d \tan \left (f x + e\right ) - \sqrt{2} \sqrt{d \tan \left (f x + e\right )} \sqrt{{\left | d \right |}} +{\left | d \right |}\right )}{a d^{4} f}\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(d*tan(f*x+e))^(1/2)/(a+a*tan(f*x+e)),x, algorithm="giac")

[Out]

1/8*d^2*(2*sqrt(2)*(d*sqrt(abs(d)) - abs(d)^(3/2))*arctan(1/2*sqrt(2)*(sqrt(2)*sqrt(abs(d)) + 2*sqrt(d*tan(f*x
 + e)))/sqrt(abs(d)))/(a*d^4*f) + 2*sqrt(2)*(d*sqrt(abs(d)) - abs(d)^(3/2))*arctan(-1/2*sqrt(2)*(sqrt(2)*sqrt(
abs(d)) - 2*sqrt(d*tan(f*x + e)))/sqrt(abs(d)))/(a*d^4*f) + 8*arctan(sqrt(d*tan(f*x + e))/sqrt(d))/(a*d^(5/2)*
f) + sqrt(2)*(d*sqrt(abs(d)) + abs(d)^(3/2))*log(d*tan(f*x + e) + sqrt(2)*sqrt(d*tan(f*x + e))*sqrt(abs(d)) +
abs(d))/(a*d^4*f) - sqrt(2)*(d*sqrt(abs(d)) + abs(d)^(3/2))*log(d*tan(f*x + e) - sqrt(2)*sqrt(d*tan(f*x + e))*
sqrt(abs(d)) + abs(d))/(a*d^4*f))